package net.youball.utils.init;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import net.youball.conf.entity.Location;
import net.youball.conf.entity.XY;
import net.youball.utils.Log;


public class AppInit implements ServletContextListener{

	public void contextDestroyed(ServletContextEvent arg0) {
		// TODO Auto-generated method stub
		
	}

	public void contextInitialized(ServletContextEvent arg0) {
		// TODO Auto-generated method stub
		Log.sendInfo("加载信息");
		boolean bool=LoadConfig.loadConfig();
		if(bool)
			Log.sendInfo("加载成功");
		else
			Log.sendInfo("加载失败");
		ServletContext app=arg0.getServletContext();
		Map<XY,List<Location>> map=new HashMap<XY, List<Location>>();
		app.setAttribute("location", map);
	}

}
